﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using TeachingManageSystem.DAL;
using TeachingManageSystem.Entity;

namespace TeachingManageSystem.BLL
{
   public  class UsersTypeBll:DBHelper
   {
       #region 根据角色ID获取角色名
       /// <summary>
       /// 根据角色ID获取角色名
       /// </summary>
       /// <param name="usersType"></param>
       /// <returns></returns>
       public static DataSet GetUsersTypeName(UsersType usersType)
       {
           var sqlParameters = new SqlParameter[1];
           sqlParameters[0] = MakeInParam("@id",SqlDbType.Int, 50,usersType.ID);
           return ProGetData("SelectUserTypeNameByID",sqlParameters);
       }
       #endregion


       #region
       /// <summary>
       /// 调用存储过程SelectAllUserTypeNames 获取所有角色
       /// </summary>
       /// <returns></returns>
       public static DataSet GetAllUsersType()
       {
           return ProGetData("SelectAllUserTypeNames", null);
       }
       #endregion
   }
}
